import { instance } from '@/utils/request';

const getHistoryPagination = (page: number, limit: number): Promise<ResponseApiDto> => {
  return instance.get(`/Historys/Pagination`, { page, limit });
};

const addHistory = (data: { gid: number }): Promise<ResponseApiDto> => {
  return instance.post(`/Historys/Add`, data);
};

const deleteHistory = (id: number): Promise<ResponseApiDto> => {
  return instance.post(`/Historys/Delete`, { id });
};

const clearAllHistory = (): Promise<ResponseApiDto> => {
  return instance.post(`/Historys/ClearAll`);
};

export default { getHistoryPagination, addHistory, deleteHistory, clearAllHistory }; // 导出 default
